﻿using System.Data.Entity;
using CaltechSoft.Service.EntityFW.Entity;
using Microsoft.AspNet.Identity.EntityFramework;

namespace CaltechSoft.Service.EntityFW.Context
{
    public partial class CaltechContext : IdentityDbContext<User>
    {
        public CaltechContext()
            : base("DefaultConnection")
        {
            var ensureDLLIsCopied = System.Data.Entity.SqlServer.SqlProviderServices.Instance;
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new TermMap());
            modelBuilder.Configurations.Add(new CertificateMap());
            modelBuilder.Configurations.Add(new CertificateDetailsMap());
            modelBuilder.Configurations.Add(new CertificateStandardMap());

            base.OnModelCreating(modelBuilder);
        }

        public DbSet<Term> Terms { get; set; }
        public DbSet<Customer> Customers { get; set; }
        public DbSet<Certificate> Certificates { get; set; }
        public DbSet<CertificateDetails> CertificateDetailses { get; set; }
        public DbSet<CertificateStandard> CertificateStandards { get; set; }
        public DbSet<Equipment> Equipments { get; set; }
        public DbSet<Quote> Quotes { get; set; }
        public DbSet<QuoteItem> QuoteItem { get; set; }
        public DbSet<WorkOrder> WorkOrders { get; set; }
        public DbSet<WorkOrderDetails> WorkOrderDetails { get; set; }
        public DbSet<CustomerEquipment> CustomerEquipments { get; set; }
        public DbSet<Po> Pos { get; set; }
        public DbSet<PoItem> PoItems { get; set; }
        public DbSet<AE> AEs { get; set; }
        public DbSet<Procedure> Procedures { get; set; }
        public DbSet<ProcedureItem> ProcedureItem { get; set; }
        public DbSet<UserHistory> UserHistories { get; set; }
        public DbSet<ReportItem> Reports { get; set; }

        //public DbSet<UserProfile> UserProfiles { get; set; }
        //public DbSet<Section> Sections { get; set; }
        //public DbSet<Order> Orders { get; set; }
        //public DbSet<OrderDetail> OrderDetails { get; set; }
        //public DbSet<Portfolio> Portfolios { get; set; }


    }


}

